public class Num {
    public static void main(String[] args){
        int a =6789%10;
        int b=6789/10%10;
        int c=6789/100%10;
        int d=6789/1000;
        System.out.println("千位数"+a);
        System.out.println("百位数"+b);
        System.out.println("十位数"+c);
        System.out.println("个位数"+d);
    }
}


